<template>
  <div class='tehui'>
    <div class="top">
      <div class="left">
        <div class="title">
          <div>限时特惠</div>
          <div>5天4:32:12</div>
        </div>
        <div class="content">
          <div class="bg"><span>杭州出发</span></div>
          <div class="txt">[48元特惠 • 富春江步道]12公里桐庐富春江线休闲绿道，打卡芦茨村-茆坪村-石舍村，乡野田园，徽派建筑，山环水抱，感受精致隐逸的慢生活（城市出游好去处）</div>
          <div class="bottom">
            <div class="money">￥<span>48</span>起</div>
            <div class="once">120</div>
          </div>
        </div>
      </div>
      <div class="right">
        <div v-for='(item,index) in xinpin' :key='index'>
          <span>{{item.title}}</span>
          <div class='box'>
            <div>{{item.txt}}</div>
            <div class="money">￥<span>{{item.money}}</span>起</div>
          </div>
        </div>
      </div>
    </div>
    <div class="bottom">
      <div class="box">
        <div class="title">宝藏小城</div>
        <div class="txt">挖掘小城魅力</div>
      </div>
      <div class="box">
        <div class="title">秋色播报</div>
        <div class="txt">赏秋好去处</div>
      </div>
      <div class="box">
        <div class="title">侠魁榜</div>
        <div class="txt">每月最佳游记</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Tehui',
  data () {
    return {
      time: '',
      flag: true,
      xinpin: [
        {
          title: '新品推荐',
          txt: '国庆火热报名',
          money: '128'
        },
        {
          title: '爆品路线',
          txt: '额济纳胡杨林',
          money: '1980'
        }
      ]
    }
  },
  computed: {
    // Ontime () {
    //   let change = setInterval(function(){
    //     var d2 = new Date(),
    //         d1 = new Date(d2.getFullYear(),d2.getMonth(),10,21,0,0);
    //     var x = d1.getTime()-d2.getTime();
    //     if (x>0) {
    //       var ms = x%1000,
    //           s = (Math.floor(x/1000%60)),
    //           minutes = (Math.floor(x/1000/60%60)),
    //           hour = (Math.floor(x/1000/60/60%24)),
    //           day = (Math.floor(x/1000/60/60/24));
    //       this.time = day+'天'+hour+':'+minutes+':'+s;
    //       // console.log(this.time)
    //       return this.time
    //     } else {
    //       clearInterval(change)
    //     }
    //   },1000)
    // }
  }
}
</script>
<style scoped lang='less'>
.tehui{
  padding:10px;
  .top{
    width: 100%;
    height: 200px;
    display: flex;
    .left,.right{
      width: 50%;
      height: 100%;
      background-image: url(/static/Home/tehui1.png);
      background-repeat: no-repeat;
      background-position: center;
      background-size: cover;
      border-radius:10px 0 0 10px;
    }
    .left{
      .title{
        padding-top:10px;
        display: flex;
        justify-content: space-around;
        &>div{
          font-weight: bold;
          color:#fff;
        }
      }
      .content{
        margin:auto;
        width: 85%;
        height: 150px;
        border-radius:10px;
        margin-top:10px;
        background-color: #fff;
        .bg{
          width: 100%;
          height: 80px;
          border-radius:10px 10px 0 0;
          background-image: url(/static/Home/tehui6.jpg);
          background-repeat: no-repeat;
          background-size: cover;
          background-position: center;
          text-align: left;
          &>span{
            background-color: rgba(0,0,0,.6);
            color:#fff;
            padding:2px 10px;
            border-radius:20px;
            position:relative;
            top:50px;
            left:10px;
          }
        }
        .txt{
          font-weight:bold;
          font-size:16px;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
          overflow: hidden;
        }
        .bottom{
          display: flex;
          .money{
            color:#ff7100;
            &>span{
              font-size:18px;
              font-weight: bold;
            }
          }
          &>.once{
            color: #999;
            text-decoration: line-through;
            height: 20px;
            font-size:12px;
            padding-top:4px;
            margin-left:4px;
          }
        }
      }
    }
    .right{
      box-sizing: border-box;
      background-image: url(/static/Home/tehui2.png);
      border-radius:0 10px 10px 0;
      padding: 0 10px;
      &>div:first-child{
        border-bottom:1px solid #fff;
      }
      &>div{
        box-sizing:border-box;
        height: 50%;
        padding:10px 0;
        text-align: left;
        &>span{
          padding-right:20px;
          font-weight: bold;
          color: #fff;
          background-image: url(/static/Home/right.png);
          background-repeat: no-repeat;
          background-position: center right;
          background-size: 16px 16px;
        }
        &>div{
          background-color: #fff;
          margin-top:10px;
          border-radius:5px;
          padding:5px 10px;
          &>div:first-child{
            font-weight: bold;
          }
          &>.money{
            color:#ff7100;
            &>span{
              font-size:18px;
              font-weight: bold;
            }
          }
        }
      }
    }
  }
  &>.bottom{
    margin-top:10px;
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: space-between;
    text-align:left;
    &>.box{
      border-radius: 10px 0 0 10px;
      width: 33%;
      height: 100%;
      box-sizing:border-box;
      background-image: url(/static/Home/tehui3.jpg);
      background-repeat: no-repeat;
      background-position: center;
      background-size: cover;
      padding:10px;
      .title{
        font-weight: bold;
      }
      .txt{
        color:#999;
      }
    }
    &>div:nth-child(2){
      background-image: url(/static/Home/tehui4.png);
      border-radius: 0;

    }
    &>div:nth-child(3){
      background-image: url(/static/Home/tehui5.png);
      border-radius: 0 10px 10px 0;
    }
  }
}
</style>
